Image processing techniques are widely used since the techniques allow reduction in the load of transmitting image data. Encoders encode input images into output images, to thereby reduce the load of transmitting image data. Transcoders decode input images into decoded images and encode the decoded images into output images, to thereby further reduce the load of transmitting the image data.
The transcoders, however, sometimes encode fine decoded images. Further, the transcoders sometimes encode decoded images which perform active motion. In some cases, therefore, the transcoders cannot reduce the load of transmitting the image data. Then, by applying the technique disclosed in Patent Document 1, the transcoders can reduce the load of transmitting the image data in the following manner.
In a first method, a transcoder uses a decoded image and a reference image for which no motion compensation is made, to thereby calculate a motion vector of the decoded image. Subsequently, the transcoder uses the decoded image and a reference image for which motion compensation is made, to thereby calculate a prediction error of the decoded image. The transcoder further encodes the motion vector and the prediction error of the decoded image.
In a second method, the transcoder does not use a decoded image and a reference image for which no motion compensation is made and sets “0” to a motion vector of the decoded image. Subsequently, the transcoder does not use the decoded image and a reference image for which motion compensation is made and sets “0” to a prediction error of the decoded image. The transcoder further encodes the motion vector and the prediction error of the decoded image.
In the first method, if a fine decoded image or a decoded image of active motion is encoded, the amount of codes of the motion vector and the amount of codes of the prediction error become larger. In the second method, even if a fine decoded image or a decoded image of active motion is encoded, the amount of codes of the motion vector and the amount of codes of the prediction error do not become larger.
The transcoder estimates whether or not a buffer of a sender or a transmission destination which temporarily stores the image data will overflow and determines whether or not to output the motion vector and the prediction error of the decoded image which are calculated by the first or second method.
Even when the motion vector and the prediction error of the decoded image which are calculated by the first method are outputted, if the transcoder estimates that the buffer of the sender or the transmission destination will not overflow, the transcoder outputs the motion vector and the prediction error of the decoded image which are calculated by the first method. Therefore, the transcoder can perform more accurate motion compensation prediction.
When the motion vector and the prediction error of the decoded image which are calculated by the first method are outputted, if the transcoder estimates that the buffer of the sender or the transmission destination will overflow, the transcoder outputs the motion vector and the prediction error of the decoded image which are calculated by the second method. Therefore, the transcoder can reduce the load of transmitting the image data.
[Patent Document 1] Japanese Patent Application Laid Open Gazette No. 5-300492
When the transcoder estimates that the buffer of the sender or the transmission destination will not overflow, however, the transcoder continues to output the motion vector and the prediction error of the decoded image which are calculated by the first method until the transcoder next estimates that the buffer of the sender or the transmission destination will overflow. In other words, the transcoder cannot predict in advance that there is a possibility of overflow until the overflow actually occurs.